namespace WordSmiths_V1.Library.Migrations
{
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using WordSmith_V1.Library.Model;

    internal sealed class Configuration : DbMigrationsConfiguration<WordSmith_V1.Library.Model.EntityFrameWork.WordSmithContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
        }

        protected override void Seed(WordSmith_V1.Library.Model.EntityFrameWork.WordSmithContext context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.
            //
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
            //


            context.Genres.AddOrUpdate(
            
                    new Genre(                       
                             "Arts & Photography"
                            
                        ),
                        new Genre(                                "Computers & Internet"
                            
                        ),
                       new Genre(                                "Biographies & Memoirs"
                            
                        ),
                        new Genre(                                "Comics & Graphic Novels"
                            
                        ),
                        new Genre(                                "Religion"
                            
                        ),
                        new Genre(                                "Science"
                            
                        ),
                        new Genre(                                "Animals"
                            
                        ),
                        new Genre(                                "Adult"
                            
                        ),
                        new Genre(                                "Romance"
                            
                        ),
                        new Genre(                                "Comedy"
                            
                        ),new Genre(                                "Adventure"
                            
                        ),new Genre(                                "Comedy"
                            
                        ),new Genre(                                "Crime"
                            
                        ));
        }
    }
}
